package com.zenithmind.document.pojo.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zenithmind.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 文档访问记录实体类
 * 
 * @author ZenithMind Team
 * @since 2025-01-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("document_access_log")
@Schema(description = "文档访问记录实体")
public class DocumentAccessLog extends BaseEntity {

    /**
     * 文档ID
     */
    @TableField("document_id")
    @Schema(description = "文档ID")
    private String documentId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    @Schema(description = "用户ID")
    private String userId;

    /**
     * 访问类型（view, download, preview, edit）
     */
    @TableField("access_type")
    @Schema(description = "访问类型")
    private String accessType;

    /**
     * 设备类型
     */
    @TableField("device_type")
    @Schema(description = "设备类型")
    private String deviceType;

    /**
     * IP地址
     */
    @TableField("ip_address")
    @Schema(description = "IP地址")
    private String ipAddress;

    /**
     * 用户代理
     */
    @TableField("user_agent")
    @Schema(description = "用户代理")
    private String userAgent;

    /**
     * 访问时长（秒）
     */
    @TableField("duration")
    @Schema(description = "访问时长（秒）")
    private Integer duration;
}
